home *** CD-ROM | disk | FTP | other *** search
/ Geek Games #12 / GEGA012.iso / Jogos de Azar / 599.swf / scripts / frame_150 / DoAction.as
Text File  |  2006-01-17  |  989b  |  42 lines

  1. if(firstTime)
  2. {
  3.    action = "PLAYING A NEW HAND";
  4.    status = action;
  5.    firstTime = "0";
  6.    cardst = cards;
  7.    call("mixCards");
  8.    hand = mixedcards.substr("1","15");
  9.    mixedcards = mixedcards.substr("16","-1");
  10.    call("sortHand");
  11. }
  12. else
  13. {
  14.    firstTime = "1";
  15.    cardst = mixedcards add descard;
  16.    call("mixCards");
  17.    lista = list;
  18.    handa = "";
  19.    while(!(list eq ""))
  20.    {
  21.       i = list.substr("1","1");
  22.       list = list.substr("2","-1");
  23.       handa = handa add mixedcards.substr("1","3");
  24.       mixedcards = mixedcards.substr("4","-1");
  25.    }
  26.    hnd = hand;
  27.    hand = handa;
  28.    call("sortHand");
  29.    handa = hand;
  30.    hand = hnd;
  31.    list = lista;
  32.    while(!(list eq ""))
  33.    {
  34.       i = list.substr("1","1");
  35.       list = list.substr("2","-1");
  36.       hand = hand.substr("1",i * "3") add handa.substr("1","3") add hand.substr((i + "1") * "3" + "1","-1");
  37.       handa = handa.substr("4","-1");
  38.    }
  39.    call("deselect");
  40. }
  41. call("showHand");
  42.